-
-
Notifications
You must be signed in to change notification settings - Fork 34k
gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value
#144568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value
#144568
Conversation
|
I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed? |
gpshead
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed?
that's probably overthinking it, we have all sorts of constants in Python modules that if changed will cause bad behavior - I don't think any special callout is necessary.
if we wanted to prevent it from being changed that'd require getting too creative with the module dict or using a C extension module instead. We rejected PEP-726 that could've offered an ability because the actual need was so rare.
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
|
Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
pythonGH-144568) (cherry picked from commit 9349972) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
pythonGH-144568) (cherry picked from commit 9349972) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-144579 is a backport of this pull request to the 3.14 branch. |
|
GH-144580 is a backport of this pull request to the 3.13 branch. |
📚 Documentation preview 📚: https://cpython-previews--144568.org.readthedocs.build/